package com.question.business.menu.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 菜单
 * </p>
 *
 * @author star
 * @since 2023-09-11
 */
@Getter
@Setter
@TableName("t_menu")
public class Menu implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    /**
     * 菜单名称
     */
    private String menuName;

    /**
     * 菜单代码
     */
    private String menuCode;

    /**
     * 上级ID
     */
    private String parentId;

    /**
     * 菜单类型(1:目录2:菜单3:按钮)
     */
    private Integer menuType;

    /**
     * 菜单顺序
     */
    private Integer menuOrder;

    /**
     * 布局(0:否1:是)
     */
    private Integer layout;

    /**
     * 显示状态(1:显示2:隐藏)
     */
    private Integer visible;

    /**
     * 路由地址
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String path;

    /**
     * 重定向
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String redirect;

    /**
     * 组件路径
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String component;

    /**
     * 图标
     */
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String icon;

    /**
     * 启用状态(1:启用2:停用)
     */
    private Integer enabled;

    /**
     * 是否删除(0:否1:是)
     */
    @TableLogic
    private Integer isDeleted;

    /**
     * 创建时间
     */
    private LocalDateTime createdTime;

    /**
     * 创建用户
     */
    @TableField(fill = FieldFill.INSERT)
    private String createdUser;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updatedTime;

    /**
     * 更新用户
     */
    @TableField(fill = FieldFill.UPDATE)
    private String updatedUser;
}
